﻿using cd.dapper.extension;
using System;
using System.Collections.Generic;
using System.Text;

namespace BusinessRepository.mysql
{
    public class MySqlAdapter : ISqlAdapter
    {
        /// <summary>
        /// 添加列
        /// </summary>
        /// <param name="sb">字串构造器</param>
        /// <param name="columnName">列名</param>
        public void AppendColumnName(StringBuilder sb, string columnName)
        {
            sb.AppendFormat("`{0}`", columnName);
        }
        /// <summary>
        /// 添加列等一个参数
        /// </summary>
        /// <param name="sb">字串构造器</param>
        /// <param name="columnName">列名</param>
        public void AppendColumnNameEqualsValue(StringBuilder sb, string columnName)
        {
            sb.AppendFormat("`{0}` = ?{1}", columnName, columnName);
        }
    }
}
